import 'package:flutter/material.dart';
import 'package:flutterdemo/navigator/page_jump_animations.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/CustomScrollView.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/NewSingleChildScrollViewScrollbar.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/NewSingleChildScrollViewvertical.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/SingleChildScrollViewdemohorizontal.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/gridview_demo.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/listview_pro.dart';
import 'package:flutterdemo/pages/tab1/scrollwidget/listviewdemo.dart';

class AllscrollDemo extends StatefulWidget {
  AllscrollDemo({Key key}) : super(key: key);

  _AllscrollDemoState createState() => _AllscrollDemoState();
}

class _AllscrollDemoState extends State<AllscrollDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AllscrollDemo'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('滚动之listview'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  ListDemos(),
                  type: 'rotateandscale',
                  // type: 'scale',
                  // type: 'rotate',
                ),
              );
            },
          ),
          ListTile(
            title: Text('滚动之SingleChildScrollView Scrollbar'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  NewSingleChildScrollViewScrollbar(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('滚动之SingleChildScrollView 竖直'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  NewSingleChildScrollViewvertical(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('滚动之SingleChildScrollView 水平'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  NewSingleChildScrollViewhorizontal(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('CustomScrollView（自定义滑动 View）'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  CustomScrollViewTest(),
                ),
              );
            },
          ),
          // ListTile(
          //   title: Text('listview demo'),
          //   onTap: () {
          //     Navigator.push(
          //       context,
          //       CustomeRouter(
          //         ListViewDemo(),
          //       ),
          //     );
          //   },
          // ),
          // ListTile(
          //   title: Text('下拉刷新上拉加载'),
          //   onTap: () {
          //     Navigator.push(
          //       context,
          //       CustomeRouter(
          //         MovieList(),
          //       ),
          //     );
          //   },
          // ),
          ListTile(
            title: Text('Listview 属性 separated builder 等'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  ListviewPro(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('GridView demo code'),
            onTap: () {
              Navigator.push(
                context,
                CustomeRouter(
                  GridViewDemo(),
                ),
              );
            },
          ),
        ],
      ),
    );
  }
}
